package com.company.project.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.company.project.common.job.utils.ScheduleUtils;
import com.company.project.entity.SysResume;
import com.company.project.mapper.ResumeMapper;
import com.company.project.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, SysResume> implements ResumeService {
    @Autowired
    private ResumeMapper resumeMapper;

//新增
    @Override
    public Integer saves(SysResume sysResume) {
        Integer i = resumeMapper.saves(sysResume);
        return i;
    }
//修改
    @Override
    public Integer updateByIds(SysResume sysResume) {
        Integer i=resumeMapper.updateByIds(sysResume);
        return i;
    }


    @Override
    public List<SysResume> findBySome(String name, String phone, String email) {
  SysResume sysResume=new SysResume();
        sysResume.setPhone(name);
        sysResume.setPhone(email);
        sysResume.setPhone(phone);
        return resumeMapper.findBySome(sysResume);
    }

    @Override
    public String findUrl(Integer id) {
        String url = resumeMapper.findUrl(id);
        String newUrl = url.substring(url.lastIndexOf("/") + 1);
        return newUrl;

    }
}
